package com.ece.utils;

import java.util.Hashtable;

public class ContextUtil {
	private static ContextUtil instance = null;
	private final Hashtable<String, String> env;
	
	private ContextUtil() {
		this.env = new Hashtable<String, String>();
		env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
		env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
		env.put("java.naming.provider.url", "localhost:1099");		
	}
	
	public static ContextUtil getInstance() {
		if(instance == null) 
			instance = new ContextUtil();
		return instance;
	}
	
	public Hashtable getEnv() {
		return this.env;
	}

}
